#####custom
prefix_x8664=/usr/local/mscore
prefix_aarch64=/usr/local/mscore_aarch64
prefix_armv7l=/usr/local/mscore_armv7l
export PKG_CONFIG_PATH:=${prefix_x8664}/lib/pkgconfig:${prefix_aarch64}/lib/pkgconfig:${prefix_armv7l}/lib/pkgconfig:$PKG_CONFIG_PATH

include platform/*.mk
#########
PROGRAM_NAME=libmsbitStream

CFLAGS_SHARE=-shared  -fPIC
DBG_FLAG=-g -rdynamic

OUT_LIB=out/lib
OUT_BIN=out/bin
OUT_INCLUDE=out/include/$(PROGRAM_NAME)

OUT_JNISRC=out/$(PROGRAM_NAME)jni_source
OUT_JNILIB=$(OUT_JNISRC)/lib
OUT_JNIINCLUDE=$(OUT_JNISRC)/include


D_LINUX64_RESOLVER_FLAGS=\
    -DCONFIG_RESOLVER \
    -DCONFIG_RESOLVER_MPEGTS \
    -DCONFIG_RESOLVER_FLV \
    -DCONFIG_RESOLVER_MP3

D_BASEAPI_FLAGS= \
    -DOS_LINUX_SOC \
    -D__STDC_FORMAT_MACROS \
    ${D_LINUX64_RESOLVER_FLAGS}
	
C_SRC= src/msbitStream.c\
	src/flv/flv.c \
	src/mp3/mp3.c \
	src/mpeg/mpegts.c
C_INCLUDE=${D_BASEAPI_FLAGS} -Isrc


default: x8664
clean:
	rm  out -fr
help:
	@echo "USAGE:make target"
	@echo "    all			Produce the ${PROGRAM_NAME}.so,and install it"
	@echo "    clean			Clear out"
	@echo "    msbitStream_api_sample	Sample program with ${PROGRAM_NAME}"
